import cv2
img1 = cv2.imread(r"/\images\005.jpeg")
ret = img1.shape

img2 = cv2.imread(r"/\images\005.jpeg")
img2 = cv2.resize(img2, (ret[1], ret[0]))

img3 = img1 + img2
img4 = cv2.add(img1, img2)

img5 = cv2.addWeighted(img1, 0.5, img2, 0.5, 0)

# bitwise 按位的
img6 = cv2.bitwise_and(img1, img2)
img7 = cv2.bitwise_or(img1, img2)
img8 = cv2.bitwise_not(img1)
img9 = cv2.bitwise_not(img2)
img10 = cv2.bitwise_xor(img1, img2)

pic_list = [("img1", img1),("img2", img2),("img3", img3),
            ("img4", img4),("img5", img5),("img6", img6),
            ("img7", img7),("img8", img8),("img9", img9),
            ("img10", img10)]

for name, pic in pic_list:
    cv2.imshow(name, pic)
    key = cv2.waitKey(10000)
    if key == 27:
        cv2.destroyWindow(name)